/**
 * Applikationsutveckling i Java, 5DV135
 * HT12
 * Project
 * 
 * File: WatchTower.java
 * Description: A class representing a shooting tower in a game
 * Date: 18 december 2012
 * 
 * cs-user: dv11mgr
 * @author Maria Gramner
 */
package nullInvader.Engine;
import java.awt.Image;
import java.awt.Point;
import java.io.IOException;
import javax.imageio.ImageIO;


public class WatchTower extends Tower {

	private Image icon;

	/**
	 * Constructor. Sets the movability of the tower, and the
	 * predetermined damage and range of this tower.
	 * 
	 * @param movable boolean.
	 */
	public WatchTower(boolean movable, Point position) {
		super(movable, -5, 4, position);
	}

	/**
	 * Method to set the correct image for the tower
	 */
	protected void setIcon() {
		try {
			icon = ImageIO.read(getClass().getResource(
					"/nullInvader/Resources/tower.jpg"));
		} catch (IOException e) {
			System.out.println("Picture tower.jpg doesn't exist");
		}
	}

	/**
	 * Method to get the current image on the tower
	 * @return Image
	 */
	public Image getIcon() {
		return icon;
	}

	/**
	 * Method for setting an effect on a unit when it walks on the
	 * tower. No current effect.
	 */
	public void landOn(Unit unit) {
	}

	/**
	 * Method for making an effect occur when the object is being
	 * clicked on. No current effect.
	 */
	public void wasClicked() {
	}
}
